package school.valon.persistence.pojo;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="comment_type")
@NamedQueries({
@NamedQuery(name="CommentType.findAll", query="SELECT c FROM CommentType c"),
@NamedQuery(name="CommentType.deleteById", query="DELETE FROM CommentType WHERE commentTypeId = :P1")
})
public class CommentType implements Serializable {

	private static final long serialVersionUID = 8382944858869798450L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="comment_type_id")
	private Integer commentTypeId;

	@Column(name="comment_type_name")
	private String commentTypeName;

	@OneToMany(mappedBy="commentType", fetch=FetchType.LAZY)
	private List<StudentClassRecordingComment> studentClassRecordingComments;

	public Integer getCommentTypeId() {
		return commentTypeId;
	}

	public void setCommentTypeId(Integer commentTypeId) {
		this.commentTypeId = commentTypeId;
	}

	public String getCommentTypeName() {
		return commentTypeName;
	}

	public void setCommentTypeName(String commentTypeName) {
		this.commentTypeName = commentTypeName;
	}

	public List<StudentClassRecordingComment> getStudentClassRecordingComments() {
		return studentClassRecordingComments;
	}

	public void setStudentClassRecordingComments(
			List<StudentClassRecordingComment> studentClassRecordingComments) {
		this.studentClassRecordingComments = studentClassRecordingComments;
	}
}